package com.manage.servlet;

import com.manage.service.WelcomeService;
import com.manage.service.impl.WelcomeServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/welcome")
public class WelcomeServlet  extends  BaseServlet {
        public Map<String, Integer> getWelData(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                WelcomeService welcomeService = new WelcomeServiceImpl();
                Map<String, Integer> welData = welcomeService.getWelData();
                return welData;
        }

        public Map<String, Object> getImgData(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                WelcomeService welcomeService = new WelcomeServiceImpl();
                Map<String, Object> imgData = welcomeService.getImgData();
                return imgData;
        }
}